package com.hnichr.ump.common.talent.library.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "t_talent_personal_info",indexes = {@Index(columnList = "USER_ID_")})
@Schema(description = "人才库-用户信息")
public class PersonalInfo extends Talent {
    /**
     * 民族
     */
    @Column(name = "NATION_")
    @Schema(description = "民族")
    private String nation;

    /**
     * 身高
     */
    @Column(name = "HEIGHT_")
    @Schema(description = "身高")
    private String height;

    /**
     * 体重
     */
    @Column(name = "WEIGHT_")
    @Schema(description = "体重")
    private String weight;

    /**
     * 驾驶证
     */
    @Column(name = "DRIVER_LICENSE_")
    @Schema(description = "驾驶证")
    private String driverLicense;


    /**
     * 紧急联系人
     */
    @Column(name = "EMERGENCY_CONTACT_")
    @Schema(description = "紧急联系人")
    private String emergencyContact;

    /**
     * 紧急联系方式
     */
    @Column(name = "EMERGENCY_PHONE_")
    @Schema(description = "紧急联系方式")
    private String emergencyPhone;

    /**
     * 用户名
     */
    @Column(name = "USERNAME_")
    @Schema(description = "用户名")
    private String username;

    /**
     * 邮箱
     */
    @Column(name = "EMAIL_")
    @Schema(description = "邮箱")
    private String email;

    /**
     * 性别0未设置 1男 2女
     */
    @Column(name = "SEX_")
    @Schema(description = "性别")
    private Integer sex;

    /**
     * 出生日期
     */
    @Column(name = "BIRTHDAY_")
    @Schema(description = "出生日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date birthday;

    /**
     * 户口所在地
     */
    @Column(name = "HOME_TOWN_",length=512)
    @Schema(description = "户口所在地")
    private String homeTown;

    /**
     * 现居地
     */
    @Column(name = "LIVE_CITY_",length=512)
    @Schema(description = "现居地")
    private String liveCity;

    /**
     * 现居地详细地址
     */
    @Column(name = "ADDRESS_",length=512)
    @Schema(description = "现居地详细地址")
    private String address;

    /**
     * 身份 1 职场人  2应届生  3在校生
     */
    @Column(name = "ID_ENTITY_")
    @Schema(description = "身份")
    private Integer idEntity;

    /**
     * 参加工作时间
     */
    @Column(name = "JOB_TIME_")
    @Schema(description = "参加工作时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date jobTime;

    /**
     * 电话
     */
    @Column(name = "PHONE_")
    @Schema(description = "电话")
    private String phone;

    /**
     * 政治面貌
     */
    @Column(name = "POLITICAL_")
    @Schema(description = "政治面貌")
    private String political;

    /**
     * 入党时间
     */
    @Column(name = "PARTY_TIME_")
    @Schema(description = "入党时间")
    private Date partyTime;

    /**
     * 工作年限
     */
    @Column(name = "WORK_YEARS_")
    @Schema(description = "工作年限")
    private Integer workYears;

    /**
     *婚姻状况 0 未婚 1已婚已育 2 已婚未育 3离异
     */
    @Column(name = "MARITAL_STATUS_")
    @Schema(description = "婚姻状况")
    private Integer maritalStatus;

    /**
     * 求职状态 0离职-随时到岗 1在职-月内到岗 2-在职考虑机会 3在职-暂不考虑
     */
    @Column(name = "WORK_STATE_")
    @Schema(description = "求职状态")
    private Integer workState;

    /**
     * 身份证号
     */
    @Column(name = "ID_NUMBER_")
    @Schema(description = "身份证号")
    private String idNumber;


    /**
     * 姓名
     */
    @Column(name = "NAME_")
    @Schema(description = "姓名")
    private String name;

    /**
     * 身份
     * 0 求职者
     * 1 企业用户
     * 2 后台人员
     * 多个,分开
     */
    @Column(name = "ROLE_TYPE_")
    @Schema(description = "身份")
    private String roleType;

    /**
     * 禁用标识 用户将无法投递任何岗位
     */
    @Column(name = "BAN_FLAG_")
    @Schema(description = "禁用标识")
    private Boolean banFlag;

    /**
     * 职位
     */
    @Column(name = "STATION_NAME_")
    @Schema(description = "职位")
    private String stationName;

    /**
     * 昵称
     */
    @Column(name = "NICK_NAME_")
    @Schema(description = "昵称")
    private String nickName;

    /**
     * 是否参加工作 1参加0未参加
     */
    @Column(name = "JOB_FLAG_")
    @Schema(description = "是否参加工作")
    private Integer jobFlag;

    /**
     * 企业用户角色标识
     * 0-普通企业用户
     * 1-企业超级管理员
     */
    @Column(name = "EN_ROLE_TYPE_")
    @Schema(description = "企业用户角色标识")
    private Integer enRoleType;


    /**
     * 外语水平(校招)
     */
    @Column(name = "FOREIGN_LANGUAGE_")
    @Schema(description = "外语水平")
    private String foreignLanguage;

    /**
     * 计算机水平(校招)
     */
    @Column(name = "COMPUTER_SKILL_")
    @Schema(description = "计算机水平")
    private String computerSkill;


    @Schema(description = "性别")
    @Transient
    private String sexStr;

    @Schema(description = "身份")
    @Transient
    private String idEntityStr;

    @Schema(description = "婚姻状况")
    @Transient
    private String maritalStatusStr;

}
